package com.swipemaster.record;

import com.swipemaster.network.WorldRecord;

public class IntegerRecord extends Record
{
	public int counter;
	private static final long serialVersionUID = 1L;

	public IntegerRecord(int id)
	{
		super(id);
	}

	@Override
	public Record clone(WorldRecord worldRecord)
	{
		final IntegerRecord clone = new IntegerRecord(recordId.getId());
		clone.counter = (int) worldRecord.time;
		return clone;
	}

	@Override
	public String getRecordStringForPHP()
	{
		return counter + "";
	}

	@Override
	public boolean isBetter(Record score)
	{
		final IntegerRecord other = (IntegerRecord) score;
		return counter > other.counter;
	}

	@Override
	public boolean isValid()
	{
		return true;
	}

	@Override
	public String toString()
	{
		return String.valueOf(counter);
	}
}
